using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

namespace BlockOS.Client
{
    public class ViewportAdapter : UIBehaviour
    {
        public RawImage image;
        protected override void OnRectTransformDimensionsChange()
        {
            var client = GameClient.Instance;
            if (client == null) return;

            client.RecreateFramebuffer();
            image.texture = client.Framebuffer;
        }
    }
}
